package com.cybertron.am.wordpress.domain.woo;

import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;
import java.util.Map;

/**
 * @author tomato
 * @date 2020/06/09
 **/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
public class WooVariant {

    private String id;

    private String sku;

    private String regularPrice;

    private WooProduct.Image image;

    private Integer stockQuantity;

    private List<Attribute> attributes;
    private List<Map<String, String>> metaData;

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    @Builder
    @JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
    public static class Attribute {

        private Integer id;

        private String name;

        private String option;
    }

}
